#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: ZhengShiQi
@file: login_page.py
@time: 2025/8/27 17:06
@desc: 登录页面元素封装
"""

from base.page_object import NewPageElement


class LoginPage:
    """登录页面元素"""
    # 页面元素
    login_button = NewPageElement(
        by="id",
        value="login-btn",
        description="登录按钮",
        wait_condition="element_to_be_clickable"
    )
    login_btn = NewPageElement(by='id', value='mb-login-btn', description="点击登录",wait_condition='element_to_be_clickable')
    username = NewPageElement(by='id', value='account', description="输入用户名")
    password = NewPageElement(by='id', value='password', description="输入密码")
    account_btn = NewPageElement(by='id', value='account-btn', description="登录",wait_condition='element_to_be_clickable')
    app_box = NewPageElement(by='id', value="appBox", delay=3, description="店铺授权提醒", wait_time=2)
    check = NewPageElement(by='id', value="mb-nav", delay=3, description="校验是否登录成功",wait_time=10, wait_condition='presence_of_element_located')
    app_box_confirm_btn = NewPageElement(by='xpath', value='//div[@class="setRemind-cancel"]',description='店铺授权取消弹框')